<template>
	<view>
		 <web-view class="web-view" :webview-styles="webviewStyles" :src="webUrl"></web-view>
	</view>
</template>

<script>
	import LoginTipDialog from "@/components/login-tip-dialog/login-tip-dialog.vue";
	export default {
		components: {
			LoginTipDialog
		},
		data() {
			return {
				webUrl:"",
				title:"",
				webviewStyles: {
					progress: {
						color: '#FF3333'
					}
				}
			}
		},
		methods: {
			onLoad: function(options) {
				this.appUtil.saveAppInviteId(options)
				this.title=options.title
				this.webUrl=decodeURIComponent(options.load_url)
			},
			onShow:function(){
				uni.setNavigationBarTitle({
					title:this.title
				})
				this.share.title = this.title
				this.share.url='/pages/article-details/index?appInviteId='+this.appUtil.getAppInviteId()+"&load_url="+encodeURIComponent(this.webUrl)
				+"&title="+this.title
				this.share.shareType=0
			},
		}
	}
</script>

<style>
	.web-view{
		width: 100rpx;
		height: 100rpx;
		display: flex;
	}
</style>
